<%@ page language="java" contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>

<script type="text/javascript">
$(document).ready(function(){
	//初始化treeTable
	var option = {
	        theme:'default',
	        expandLevel : 3,
	        column:2
    };
    $('.treeTable').treeTable(option);
});
</script>
<dwz:paginationForm action="${contextPath}/dict/list_item/${dictId}" page="${page}" onsubmit="return navTabSearch(this)">
	<input type="hidden" name=search_LIKE_code value="${param.search_LIKE_code}"/>
	<input type="hidden" name=search_LIKE_name value="${param.search_LIKE_name}"/>
</dwz:paginationForm>
<form method="post" action="${contextPath}/dict/list_item/${dictId}" onsubmit="return navTabSearch(this)">
	<div class="pageHeader">
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label>字典码：</label>
					<input type="text" name=search_LIKE_code value="${param.search_LIKE_code}"/>
				</li>
				<li>
					<label>字典值：</label>
					<input type="text" name=search_LIKE_name value="${param.search_LIKE_name}"/>
				</li>
			</ul>
			<div class="subBar">
				<ul>						
					<li><div class="button"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
				</ul>
			</div>
		</div>
	</div>
</form>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a iconClass="book_add" rel="lookup2dict_create" mask="true" target="dialog"  width="530" height="300"  href="${contextPath}/dict/createItem/${dictId}"><span>添加字典项</span></a></li>
			<li><a iconClass="book_edit" rel="lookup2dict_edit"   target="dialog"  width="540" height="350" mask="true" href="${contextPath}/dict/editItem/${dictId}/{slt_uid}"><span>编辑字典项</span></a></li>
			<li><a iconClass="book_delete" class="delete" target="selectedTodo" rel="ids"  title="确认要删除该字典吗?"   href="${contextPath}/dict/deleteItem"><span>删除字典项</span></a></li>
		</ul>
	</div>
	<table class="list treeTable" layoutH="135" width="100%">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th>字典码</th>
				<th>字典值</th>
				<th>备注</th>
				<th width="50">排序</th>
				<th width="60">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${dicts}">
			<tr target="slt_uid" rel="${item.id}"   id="${item.id}" 
			<c:if test="${item.parent.id!=dictId}">
				pId="${item.parent.id}"
			</c:if>>
				<td><input name="ids" value="${item.id}" type="checkbox"></td>
				<td>${item.code}</td>
				<td>${item.name}</td>
				<td>${item.remark}</td>
				<td>${item.priority}</td>
				<td>
					<div>
						<a title="编辑字典项" rel="lookup2dict_edit"   target="dialog"  width="540" height="350" mask="true"  href="${contextPath}/dict/editItem/${dictId}/${item.id}"  class="btnEdit">编辑</a>
						<a title="确定删除该字典项吗?" target="ajaxTodo" href="${contextPath}/dict/deleteItem/?ids=${item.id}" class="btnDel">删除</a>
					</div>
				</td>
			</tr>
			</c:forEach>
			
		</tbody>
	</table>
	
	

	
</div>